import router from "@/router";
import { getToken } from "@/assets/js/auth";
router.beforeEach((to, from, next) => {
  // console.log("router.beforeEach", to, from);
  if (getToken()) {
    next();
  } else {
    if (to.path == "/login") {
      next();
      return;
    }
    next("login");
  }
});
